﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Synchronization.MetadataStorage;

namespace Obra.Sync
{
    internal class SyncSchema
    {
        // XXX: Use P/Invoke to get this value?
        public const ushort MAX_PATH = 260;

        // XXX: This is the length of an MD5 checksum, if the algorithm changes
        // this will have to change too.
        public const ushort MAX_CHECKSUM = 32;

        public const string CHECKSUM = "Checksum";
        public const string TIMESTAMP = "Timestamp";

        private readonly List<FieldSchema> fieldSchemas =
            new List<FieldSchema>();

        public List<FieldSchema> FieldSchemas
        {
            get { return fieldSchemas; }
        } 

        public SyncSchema()
        {
            this.FieldSchemas.Add(new FieldSchema(
                SyncSchema.CHECKSUM, 
                typeof(string),
                SyncSchema.MAX_CHECKSUM));

            this.FieldSchemas.Add(new FieldSchema(
                SyncSchema.TIMESTAMP, 
                typeof(ulong)));
        }
    }
}
